OS X text encryption with GPGTools
GPGTools allows you to encrypt/decrypt/verify/sign/etc text all throughout OS X via a right-click context menu. It also integrates with email clients.
Installing GPGTools
Visit the GPGTools homepage to install the GPGTools Suite. Unfortunately you can’t install them one piece at a time!
Ignore the message on the front page about how it doesn’t work with El Capitain, if you read closely it’s just saying “we have a beta version of the email integration,” not “it doesn’t work.” They need a new copywriter.
Setting up GPGTools
I don’t like the original settings of GPGTools at all, so we’re all going to change them.
Go into System Preferences and click Keyboard.
Once you’re in Keyboard, select Shortcuts from the top tab menu, then Services on the left hand side.
You can now scroll through the right-hand listing until you see OpenPGP options. I’ve selected:
- OpenPGP: Decrypt
- OpenPGP: Encrypt
- OpenPGP: Import key
- OpenPGP: Insert my fingerprint
- OpenPGP: Insert my key
- OpenPGP: Sign
- OPenPGP: Verify
Using GPGTools
To use GPGTools, all you need to do is right click some selected text, go to Services, and select what you’d like to do with it.
Adding a key
Select the text below, right click, Services, and then OpenPGP: Import Key.
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFd1X3oBEADVW8p5a21Xc2CNUhBlC21PoTkHFycjyy8cCFRMXzx1kbMCxk6g
Opqxa6IfHXJvxt7BP1leHZinybjCWp6BwlUyLrrWH+qS801AXV1YwHFq0tpDo4Gt
f4SjWyt+DPLRRxPgDcYublbq7j2Htulbe0FyVeZ/8n776hHCJ0wcOwu/YuZ4v6tk
E4j3bsIGWAcDnqSLBfcj81qBPFdCjmbWUlcKLNK5p8QloeaBfP/KRi7dhg7qhn7/
n+uXV9HPQbtXHtsEuq/SUJLX4CpkOsCQQFE8VHGeNjT9WquyutQt06H0iDktW8oV
tMPqSx5FM139zMB8GpvL2aKCyKTJ37QwL616abV46UCguefG8kBhTYiV3lkpBv36
MLKwSktLb2/3wpKMkAzd4LpTFyFiNCkRPUEXeCibg6er3XSesNciHf1Nr+2As5+0
j1l2XgbhnbmwKJnA+XypphtxtRTeY4EB9sX/7k4wGYQ2NEGaNyFsKqiUIypBo0BX
VGJj4PG6eop6N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GuI3qeMpL9EE
T3Fknhj9BX9HNFo4puQjleWu3gK0ra/sZJFnkjgK7OgqeJvotUnhPNG6rHiG9Bty
e8vWKZzJF4KKFh9CBRyIwzUJ7O6QCnUEAUOWJX3nPBKXk5Ov51ogl0TOOxp6mwl4
zt0+RWQIZ39WOicH0Vv6+PSLC/nnvNCxT/aPTTgny7EpQ71lRIzOvksrZU1Mpkmj
za40qYAbIUOIf4vJdE73f5Dgwpl5oM3AalyTzhgLOxprL7/g7MefrwIs+G4/fVXT
sSLLHpJqXsD8ESHPYPUqcn69gmIJb/AQOhm0qfGaYaf+q/S4UBRbLpiQgGf/vrNy
UbcR/ciAvBkdA6VeUbr1TTimhQ==
=LLVY
-----END PGP PUBLIC KEY BLOCK-----
Verifying signatures
You can verify a signature by selecting a signed message, right-clicking, Services, and then selecting OpenPGP: Verify.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
I might eat Chipotle for lunch today.
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCAAGBQJXdllSAAoJEJ+YbdnIhiyaY5wP/3CW0rBXxZuskK0+5GaVIKTY
xxxSorGDV9BKd3abT4OVwx59BgTfMTVal2y8jik/2hbXry2XNeb/gK1ZTQpyug3u
V+wVTdXotolzfb6zK+ZEkkVW7k9P1vWA8uMG0e07d2rzzSZnj675MW+2bp12hzsG
/pQJZhtLbKd1A+EJHi4Nzz5dsd0h8wOEEg0tvYC4krj2CaVsk2lv4hUNHrhdtzee
J4QkUtyemfBEZlATlUY6ID4kvXKfxUZY3GsfazGj2iioYFxB0LNNlBU8h2MsZB1J
OLl22NruwNjqebgVOlRH/DceQzok1sqrXioPz9MrE7Xf2mp0hkmysA1KlC3TPKEq
dwK8TXbGPVChVBKWCUIDkiGMjaP5NrHdvCKXxQXzDdsorNfEizVfuhufNGrS/W25
hZaD3ZVghgkj4hAfXa1S5x5AwaidGBclh3ndsy2g9FSNxWMuvXy7rvkF9pgUWwvO
WYQGDYWvZmMFSAfoNMKeojYsdR36vg1TzIykjrEezAt8z/albtfAs7AhSdAbB//u
/L/hlB+OzImT04+z+SdhnWNHRENvuF4WqGNAe+WkTODYXLUIBNDOvp8SPD7ZeHH4
gXBFijS071PYt5kTCUOs0ri0HFEIrq4ybQ3J6pLPitOZW3qwHrCdwkrhMf4RPw2L
di4hPMPvFpa+9xuBQOrB
=mDGT
-----END PGP SIGNATURE-----
Now try to verify the one below.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
I might eat mice for lunch today.
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCAAGBQJXdllSAAoJEJ+YbdnIhiyaY5wP/3CW0rBXxZuskK0+5GaVIKTY
xxxSorGDV9BKd3abT4OVwx59BgTfMTVal2y8jik/2hbXry2XNeb/gK1ZTQpyug3u
V+wVTdXotolzfb6zK+ZEkkVW7k9P1vWA8uMG0e07d2rzzSZnj675MW+2bp12hzsG
/pQJZhtLbKd1A+EJHi4Nzz5dsd0h8wOEEg0tvYC4krj2CaVsk2lv4hUNHrhdtzee
J4QkUtyemfBEZlATlUY6ID4kvXKfxUZY3GsfazGj2iioYFxB0LNNlBU8h2MsZB1J
OLl22NruwNjqebgVOlRH/DceQzok1sqrXioPz9MrE7Xf2mp0hkmysA1KlC3TPKEq
dwK8TXbGPVChVBKWCUIDkiGMjaP5NrHdvCKXxQXzDdsorNfEizVfuhufNGrS/W25
hZaD3ZVghgkj4hAfXa1S5x5AwaidGBclh3ndsy2g9FSNxWMuvXy7rvkF9pgUWwvO
WYQGDYWvZmMFSAfoNMKeojYsdR36vg1TzIykjrEezAt8z/albtfAs7AhSdAbB//u
/L/hlB+OzImT04+z+SdhnWNHRENvuF4WqGNAe+WkTODYXLUIBNDOvp8SPD7ZeHH4
gXBFijS071PYt5kTCUOs0ri0HFEIrq4ybQ3J6pLPitOZW3qwHrCdwkrhMf4RPw2L
di4hPMPvFpa+9xuBQOrB
=mDGT
-----END PGP SIGNATURE-----
Encrypting a message
You can also encrypt messages. You could even encrypt this message. Select text, right click, Services, and OpenPGP: Encrypt.
You’ll be prompted for who you want to send it to, and then tada!
-----BEGIN PGP MESSAGE-----
hQIMAzOWSuxcaD4YAQ/5AYjO6QYV5reK9WfuTAY2TKm+1vlkioRWhtjtaAqPy3b9
UxWQdoRus/9Hf81chQ/vWw3GoRBEno0TRQDk9AKdD3dFom7fhABD/UwOwREleAfz
fc13s8SBqyFjmxPa6MYEDPd3xZee28HH3k36qKoVh3wqorlXSS/S8VRkxP5vpRMW
HEKL7AZheOOW97lkYbzOQHW4G2bwwZE8H1BMAlx7++S8vHcorWG6fQSrwjdB5iAO
u7dYiKlLOqg1kO38YJXMjR0kUkZpW7vhIbEHGM60R8rsmfk1trHpflkqcz/X8sBr
rx2QNLWPcCJSQxrxrEgwbpVfFNxFIYpymSvgVSpiG+yJ0H4un+7MzRPbleyLTvvY
lIhc2uyMn1LjMQzjuN98uYnehlIjJHLCZUkwLHsuSFfL02hG15V2vBJJ9VoY5zRo
goolufW5Mp0Jalu/daCsBPwvOeKP0mDSy/wnZN0xbK87d+/30vLC/2v1XJLhZmVJ
aGGMHeVVH7Y1Hsq4IE6TP4aKxRhszfP2ACxwUBGlk8I6v+D0p5BYDQ5QGC1S09/0
Pm58ufOIYN9kk6bI3FkubDNgGPdpYmjbTQNOpdNCQOMYpkAQpU8xvIPKgpDPmKqE
nX8d7meNmDmcXYWEQtPbms/WSIHC6lcrftVITvliynZXfA1Tp4Mp4O9NMufBMdvS
qgF2d6bjKJaKJq+FY6eguyK3Y9fXvUXgkipCvhaw+X/H3OqkMqEyoz1CaUj2he4v
Vjge9WtGA6B9aPhLSkkyNfulMyjNmlKuh0xp1zi1/Cr7FlE6OzHnk353SN+nN2Za
mCh1vws8cb4Ip/wayW088Zy9sWLSuEfshYz2y+gcAfUtzl0SWxbbO1p5/nGltOG3
nETTCMpihl2yxKO/RmXn/G1n+uWnGHwECeD2
=tGYJ
-----END PGP MESSAGE-----
You can’t read this, as I’m the only intended recipient (be sure you pick who you’re sending it to! If you don’t have their key, track it down).